<template>
    <div class="goodsdesc-container"> 
        <h1 class="title">{{info.title}}</h1>
        <hr>
        <div class="content" v-html="info.content">

        </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            info:{}
        }
    },
    methods:{
        async getGoodsDesc(){
            const {data} = await this.$http.get("/api/goods/getdesc/"+this.id)
            if(data.status===0) this.info=data.message[0]
        }
    }
    ,
    props:["id"],
    created(){
        this.getGoodsDesc()
    }
}
</script>

<style lang="scss">
    .goodsdesc-container{
        .title{
        font-size: 18px;
        margin: 10px 0;
        color: blue;
        text-align: center;
    }
        .content{
            img{
                width: 100%;
            }
        }
    }
</style>